package com.myhome.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.myhome.domain.UserAuthInfo;
import com.myhome.mapper.UserAuthInfoMapper;
import com.myhome.service.UserAuthInfoService;
/**
*@Author QYiXin 
* @Date 2021 10 13 10 51
**/
@Service
public class UserAuthInfoServiceImpl extends ServiceImpl<UserAuthInfoMapper, UserAuthInfo> implements UserAuthInfoService{

    @Override
    public List<UserAuthInfo> getAuthInfoByUserId(Long id) {
        return this.list(new LambdaQueryWrapper<UserAuthInfo>().eq(UserAuthInfo::getUserId, id));
    }

    @Override
    public List<UserAuthInfo> getAuthInfoByAuthCode(Long authCode) {
        return this.list(new LambdaQueryWrapper<UserAuthInfo>().eq(UserAuthInfo::getAuthCode, authCode));
    }
}
